(0) Obligation:
Clauses:
q(X, Y) :- m(X, Y, Z).
m(X, 0, X).
m(0, Y, 0) :- !.
m(X, Y, Z) :- ','(p(X, A), ','(p(Y, B), m(A, B, Z))).
p(0, 0).
p(s(X), X).
Query: q(g,g)
(1) PrologToDTProblemTransformerProof (SOUND transformation)
Built DT problem from termination graph DT10.
(2) Obligation:
Triples:
mA(s(X1), X2) :- mA(X1, X2).
mB(s(X1), 0, X2) :- mA(X1, X2).
mB(s(X1), s(X2), X3) :- mB(X1, X2, X3).
qC(X1, X2) :- mB(X1, X2, X3).
Clauses:
mcA(X1, X1).
mcA(0, 0).
mcA(s(X1), X2) :- mcA(X1, X2).
mcB(X1, 0, X1).
mcB(0, 0, 0).
mcB(s(X1), 0, X2) :- mcA(X1, X2).
mcB(0, X1, 0).
mcB(s(X1), s(X2), X3) :- mcB(X1, X2, X3).
Afs:
qC(x1, x2) = qC(x1, x2)
(3) TriplesToPiDPProof (SOUND transformation)
We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
qC_in: (b,b)
mB_in: (b,b,f)
mA_in: (b,f)
Transforming
TRIPLES into the following
Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:
QC_IN_GG(X1, X2) → U4_GG(X1, X2, mB_in_gga(X1, X2, X3))
QC_IN_GG(X1, X2) → MB_IN_GGA(X1, X2, X3)
MB_IN_GGA(s(X1), 0, X2) → U2_GGA(X1, X2, mA_in_ga(X1, X2))
MB_IN_GGA(s(X1), 0, X2) → MA_IN_GA(X1, X2)
MA_IN_GA(s(X1), X2) → U1_GA(X1, X2, mA_in_ga(X1, X2))
MA_IN_GA(s(X1), X2) → MA_IN_GA(X1, X2)
MB_IN_GGA(s(X1), s(X2), X3) → U3_GGA(X1, X2, X3, mB_in_gga(X1, X2, X3))
MB_IN_GGA(s(X1), s(X2), X3) → MB_IN_GGA(X1, X2, X3)
R is empty.
The argument filtering Pi contains the following mapping:
mB_in_gga(
x1,
x2,
x3) =
mB_in_gga(
x1,
x2)
s(
x1) =
s(
x1)
0 =
0
mA_in_ga(
x1,
x2) =
mA_in_ga(
x1)
QC_IN_GG(
x1,
x2) =
QC_IN_GG(
x1,
x2)
U4_GG(
x1,
x2,
x3) =
U4_GG(
x1,
x2,
x3)
MB_IN_GGA(
x1,
x2,
x3) =
MB_IN_GGA(
x1,
x2)
U2_GGA(
x1,
x2,
x3) =
U2_GGA(
x1,
x3)
MA_IN_GA(
x1,
x2) =
MA_IN_GA(
x1)
U1_GA(
x1,
x2,
x3) =
U1_GA(
x1,
x3)
U3_GGA(
x1,
x2,
x3,
x4) =
U3_GGA(
x1,
x2,
x4)
We have to consider all (P,R,Pi)-chains
Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES
(4) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
QC_IN_GG(X1, X2) → U4_GG(X1, X2, mB_in_gga(X1, X2, X3))
QC_IN_GG(X1, X2) → MB_IN_GGA(X1, X2, X3)
MB_IN_GGA(s(X1), 0, X2) → U2_GGA(X1, X2, mA_in_ga(X1, X2))
MB_IN_GGA(s(X1), 0, X2) → MA_IN_GA(X1, X2)
MA_IN_GA(s(X1), X2) → U1_GA(X1, X2, mA_in_ga(X1, X2))
MA_IN_GA(s(X1), X2) → MA_IN_GA(X1, X2)
MB_IN_GGA(s(X1), s(X2), X3) → U3_GGA(X1, X2, X3, mB_in_gga(X1, X2, X3))
MB_IN_GGA(s(X1), s(X2), X3) → MB_IN_GGA(X1, X2, X3)
R is empty.
The argument filtering Pi contains the following mapping:
mB_in_gga(
x1,
x2,
x3) =
mB_in_gga(
x1,
x2)
s(
x1) =
s(
x1)
0 =
0
mA_in_ga(
x1,
x2) =
mA_in_ga(
x1)
QC_IN_GG(
x1,
x2) =
QC_IN_GG(
x1,
x2)
U4_GG(
x1,
x2,
x3) =
U4_GG(
x1,
x2,
x3)
MB_IN_GGA(
x1,
x2,
x3) =
MB_IN_GGA(
x1,
x2)
U2_GGA(
x1,
x2,
x3) =
U2_GGA(
x1,
x3)
MA_IN_GA(
x1,
x2) =
MA_IN_GA(
x1)
U1_GA(
x1,
x2,
x3) =
U1_GA(
x1,
x3)
U3_GGA(
x1,
x2,
x3,
x4) =
U3_GGA(
x1,
x2,
x4)
We have to consider all (P,R,Pi)-chains
(5) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 6 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
MA_IN_GA(s(X1), X2) → MA_IN_GA(X1, X2)
R is empty.
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
MA_IN_GA(
x1,
x2) =
MA_IN_GA(
x1)
We have to consider all (P,R,Pi)-chains
(8) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(9) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MA_IN_GA(s(X1)) → MA_IN_GA(X1)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(10) QDPSizeChangeProof (EQUIVALENT transformation)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.
From the DPs we obtained the following set of size-change graphs:
- MA_IN_GA(s(X1)) → MA_IN_GA(X1)
The graph contains the following edges 1 > 1
(11) YES
(12) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
MB_IN_GGA(s(X1), s(X2), X3) → MB_IN_GGA(X1, X2, X3)
R is empty.
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
MB_IN_GGA(
x1,
x2,
x3) =
MB_IN_GGA(
x1,
x2)
We have to consider all (P,R,Pi)-chains
(13) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(14) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MB_IN_GGA(s(X1), s(X2)) → MB_IN_GGA(X1, X2)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(15) QDPSizeChangeProof (EQUIVALENT transformation)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.
From the DPs we obtained the following set of size-change graphs:
- MB_IN_GGA(s(X1), s(X2)) → MB_IN_GGA(X1, X2)
The graph contains the following edges 1 > 1, 2 > 2
(16) YES